how to disable switch in flutter

64

// To disable your Switch, edit its onChanged method to null like this

Switch(
  onChanged: null,
  value: true,
  inactiveThumbColor: Colors.tealAccent,
  inactiveTrackColor: Colors.tealAccent.withOpacity(0.5),
  // ...
),

Comments

Submit
0 Comments